﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChargeTJ.aspx.cs" Inherits="IYAKASAPortal.Charge.ChargeTJ" %>

<%@ Register Assembly="gfPage" Namespace="gfPage" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>成都弥荣科技发展有限公司--收费信息统计</title>
    <link rel="stylesheet" href="../support/tfNiceTable/tfNiceTable.css" />
    <style type="text/css">
        label.error{
            color:red;
        }
    </style>
    <script type="text/javascript" src="../support/tfNiceTable/tfNiceTable.js"></script>
    <script type="text/javascript" src="../script/jquery-3.2.1.min.js"></script>
    <script type="text/javascript">
        function doAjaxShow() {
            document.getElementById("divNiceTableMessage").style.left = $(window).width / 2;// window.parent.document.getElementById("mainContentFrame").scrollWidth/2-200;
            document.getElementById("divNiceTableMessage").style.top = $(window).height / 2;//window.parent.document.getElementById("mainContentFrame").scrollHeight/2-15;

            document.getElementById("divNiceTableMessage").style.display = "block";
        }
    </script>
</head>
<body>
    <form id="form1" action="ChargeTJ.aspx" method="post" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <input type="hidden" id="txtUniqueKey" name="txtUniqueKey" value="" />
                <div id="divNiceTableMessage" class="tfNiceTableMessage" style="display: none;">正在处理...</div>
                <table border="0" width="100%" cellpadding="0" cellspacing="0" style="height: 25px;">
                    <tr>
                        <td class="main_title_left"></td>
                        <td class="main_title_center">&nbsp;成都弥荣科技发展有限公司--收费信息统计</td>
                        <td class="main_title_right"></td>
                    </tr>
                </table>
                <table width="100%" cellpadding="0" cellspacing="0" border="0" class="mainWidth">
                    <tr>

                        <td>
                            <table class="table_without_border">
                                <tr>
                                    <td>
                                        <img src="../support/tfNiceTable/images/tfNiceTable_Search.gif" alt="" />
                                        收费员<asp:DropDownList ID="drpSFY" runat="server">
                                            <asp:ListItem Value="0">全部</asp:ListItem>
                                        </asp:DropDownList>
                                        号牌种类<asp:DropDownList ID="drpHPZL" runat="server">
                                            <asp:ListItem Value="0">全部</asp:ListItem>
                                        </asp:DropDownList>
                                        收费种类<asp:DropDownList ID="drpSFZL" runat="server"></asp:DropDownList>
                                        开始时间<asp:TextBox Width="130px" ID="txtStart" onclick="InitData('#txtStart')" runat="server"  Height="18px"></asp:TextBox>
                                        结束时间<asp:TextBox Width="130px" ID="txtEnd" onclick="InitData('#txtEnd')" runat="server"  Height="18px"></asp:TextBox>
                                        关键字<asp:TextBox Width="120px" ID="txtKeywords" runat="server" Height="18px"></asp:TextBox>
                                        <asp:Button ID="btnSearch" runat="server" Text="" CssClass="btnSearch" OnClientClick="doAjaxShow();" OnClick="btnSearch_Click" />
                                        <asp:Button ID="btnSearchAll" runat="server" Text="" CssClass="btnSearchAll" OnClientClick="doAjaxShow();" OnClick="btnSearchAll_Click" />
                                    </td>
                                    <td align="right">
                                        <asp:Button ID="btnPrintAJ" runat="server" Text="" CssClass="btnPrintEnabled" OnClientClick="doAjaxShow();" OnClick="btnPrintAJ_Click" />&nbsp;
                                        <asp:Button ID="btnExport" runat="server" Text="" CssClass="btnExportEnabled" OnClick="btnExport_Click" />
                                    </td>
                                </tr>
                            </table>
                            <table border="1" cellspacing="0" cellpadding="3" class="tfNiceTable">
                                <thead>
                                    <tr class="tfNiceTable_head_style">
                                        <td style="width: 2%" align="center" class="tfNiceTable_head_topleft">&nbsp;</td>
                                        <td style="width: 4%" align="center">ID</td>
                                        <td style="width: 20%" align="center">费用流水号</td>
                                        <td style="width: 10%" align="center">号牌号码</td>
                                        <td style="width: 10%" align="center">号牌种类</td>
                                        <td style="width: 8%" align="center">收费种类</td>
                                        <td style="width: 10%" align="center">收费项目 </td>
                                        <td style="width: 10%" align="center">收费金额</td>
                                        <td style="width: 6%" align="center">收费员</td>
                                        <td style="width: 20%" align="center">收费日期</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <asp:Repeater ID="rptList" runat="server">
                                        <ItemTemplate>
                                            <tr style="cursor: pointer;" onmouseover="doMouseOver(this);" onmouseout="doMouseOut(this);" onclick="setSelectedRowData(this,'<%# DataBinder.Eval(Container.DataItem, "ID")%>');">
                                                <td align="center" class="tfNiceTable_body_arrow">
                                                    <img src="../support/tfNiceTable/images/tfNiceTable_Pointer.gif" alt="" /></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "ID")%></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "SFLSH")%></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "HPHM")%></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "HPZL")%></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "SFZL")%></td>
                                                <td align="center"><%# getXMNmame(DataBinder.Eval(Container.DataItem, "SFXM").ToString())%></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "SFZJE")%></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "SFY")%></td>
                                                <td align="center"><%# DataBinder.Eval(Container.DataItem, "SFRQ")%></td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>

                                    <table width="100%" style="font-size: 1.3em">
                                        <tr>
                                            <td style="padding-right: 70px" align="right">合计:&nbsp;<asp:Label ID="lblTotal" runat="server" Text="" ForeColor="Red" Font-Bold="true" Font-Size="Larger"><%=getTotal() %></asp:Label>&nbsp;元&nbsp;</td>
                                        </tr>
                                    </table>
                                </tbody>
                                <tr>
                                    <td align="right" colspan="8">
                                        <cc1:GreatPager ID="GreatPager1" runat="server" GenerateNumber="true" OnPageIndexChanging="GreatPager1_PageIndexChanging"></cc1:GreatPager>
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
<script type="text/javascript" src="../support/jedate/jedate.min.js"></script>
<script type="text/javascript" src="../script/jquery.validate.min.js"></script>
<script type="text/javascript">
    function InitData(oId) {
        jeDate({
            dateCell: oId,//isinitVal:true,
            format: "YYYY-MM-DD hh:mm:ss",
            isTime:true, //isClear:false,
            minDate: "2000-10-19 00:00:00",
            maxDate: "2099-11-8 00:00:00"
        });
    }

    jQuery(function () {
        jQuery.validator.methods.compareDate = function (value, element, param) {
            var startDate = jQuery(param).val();

            var date1 = new Date(Date.parse(startDate.replace("-", "/")));
            var date2 = new Date(Date.parse(value.replace("-", "/")));
            return date1 < date2;
        };

        jQuery("#form1").validate({
            focusInvalid: false,
            rules: {
                "txtStart": {
                    date: true
                },
                "txtEnd": {
                    date: true
                    //compareDate: "#txtStart"
                }
            },
            messages: {
                "txtStart": {
                    date:"时间格式错误!"
                },
                "txtEnd": {
                    date:"时间格式错误!"
                    //compareDate: "结束日期必须大于开始日期!"
                }
            }
        });

    });
</script>
